-- GENERATED SPELL FOR [Deathforge Summoner] --


function spell0_20872(pUnit, Event) --@Fel Immolate,n/a--
pUnit:FullCastSpellOnTarget(37628,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20872', 17000, 1)
end

function spell1_20872(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20872', 3000, 1)
end

function Sorts_20872(pUnit, Event)
local choix_sorts_20872 = math.random(0, 1)
if choix_sorts_20872 == 0 then
pUnit:RegisterEvent('spell0_20872', 1, 1)
end
if choix_sorts_20872 == 1 then
pUnit:RegisterEvent('spell1_20872', 1, 1)
end
end

function mob20872_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20872', math.random(1500, 3000), 1)
end

function mob20872_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20872_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20872_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20872, 1, 'mob20872_Action')
RegisterUnitEvent(20872, 2, 'mob20872_Leave')
RegisterUnitEvent(20872, 3, 'mob20872_Kill')
RegisterUnitEvent(20872, 4, 'mob20872_Die')
